#include<iostream>
#include<cstring>
using namespace std;
const int maxN=20;
int haspmap[21];
int fib(int n)
{
	if(haspmap[n]!=-1)
	{
		return haspmap[n];
	}
	haspmap[n]=fib(n-1)+fib(n-2);
	return haspmap[n];
}
int main()
{
	int n;
	memset(haspmap,-1,sizeof(haspmap));
  
	while(cin>>n)
	{
		cout<<fib(n)<<endl;
	}
}